export default {
  methods: {
    toSearch () {
      let params = arguments[0];
      if(params.isNeedTree && params.isNeedTree===true){
        delete params.isNeedTree
        if(params.parkIds){
          let paramName = params['parkIdParamName']
          this.otherParams[paramName] = params.parkIds
          this.otherParams['parkSysType'] = params.parkSysType
          delete params.parkIds
          delete params.parkIdParamName
          delete params.parkSysType
          if(params.areaIds){
            this.otherParams['areaIds'] = params.areaIds
            delete params.areaIds
          }
          if(params['enterChannelNames']){
            let enterChannelParamName = params['enterChannelParamName']
            this.otherParams[enterChannelParamName] = params['enterChannelNames']
            delete params.enterChannelNames
            delete params.enterChannelParamName
          }
          if(params['leaveChannelNames']){
            let leaveChannelParamName = params['leaveChannelParamName']
            this.otherParams[leaveChannelParamName] = params['leaveChannelNames']
            delete params.leaveChannelNames
            delete params.leaveChannelParamName
          }
          this.searchParams = $.extend({}, params);
          this.confirmSearch(params);
          return
        }
        this.searchParams = $.extend({}, params);
        return
      }
      this.searchParams = $.extend({}, params);
      this.confirmSearch(params);
    }
  }

}